<?php
namespace zake\foundation\able\stream;

/**
 * Interface ChannelDriverAble
 * @package zake\foundation\able\stream
 *
 *
 */
interface DuplexDriverAble
{

    /**
     * @param int $pid 当前进程id
     *
     * @author liu.bin 2020-04-06 00:36
     */
    public function init($pid);


    /**
     * 获取读资源
     * @return ReadBufferAble|ReadAble|RwAble|RwBufferAble
     * @author liu.bin 2020-03-30 15:19
     */
    public function getReadStream();


    /**
     * 获取写资源
     * @return WriteBufferAble|WriteAble|RwAble|RwBufferAble
     * @author liu.bin 2020-03-31 15:58
     */
    public function getWriteStream();

}
